import numpy as np
import matplotlib.pyplot as plt

# x < 0
x1 = np.linspace(-5,0,20)
y1 = np.zeros(x1.shape)
# x >= 0
x2 = np.linspace(0,5,20)
y2 = x2

fig,ax = plt.subplots()

ax.plot(x1,y1,'r-')
ax.plot(x2,y2,'r-')

plt.show()